// license-header java merge-point
/**
 * This is only generated once! It will never be overwritten.
 * You can (and have to!) safely modify it by hand.
 */
package org.tinaelle.server.domain;
/**
 * @see org.tinaelle.server.domain.AdAlertProcessor
 */
public class AdAlertProcessorDaoImpl
    extends org.tinaelle.server.domain.AdAlertProcessorDaoBase
{
    /**
     * @see org.tinaelle.server.domain.AdAlertProcessorDao#toAdAlertProcessorDTO(org.tinaelle.server.domain.AdAlertProcessor)
     */
    public org.tinaelle.common.dto.AdAlertProcessorDTO toAdAlertProcessorDTO(final org.tinaelle.server.domain.AdAlertProcessor entity)
    {
        return super.toAdAlertProcessorDTO(entity);
    }

    /**
     * Retrieves the entity object that is associated with the specified value object
     * from the object store. If no such entity object exists in the object store,
     * a new, blank entity is created
     */
    private org.tinaelle.server.domain.AdAlertProcessor loadAdAlertProcessorFromAdAlertProcessorDTO(org.tinaelle.common.dto.AdAlertProcessorDTO adAlertProcessorDTO)
    {
        org.tinaelle.server.domain.AdAlertProcessor adAlertProcessor = this.load(adAlertProcessorDTO.getAdAlertProcessorId());
        if (adAlertProcessor == null)
        {
            adAlertProcessor = org.tinaelle.server.domain.AdAlertProcessor.Factory.newInstance();
        }
        return adAlertProcessor;
    }

    
    /**
     * @see org.tinaelle.server.domain.AdAlertProcessorDao#adAlertProcessorDTOToEntity(org.tinaelle.common.dto.AdAlertProcessorDTO)
     */
    public org.tinaelle.server.domain.AdAlertProcessor adAlertProcessorDTOToEntity(org.tinaelle.common.dto.AdAlertProcessorDTO adAlertProcessorDTO)
    {
        org.tinaelle.server.domain.AdAlertProcessor entity = this.loadAdAlertProcessorFromAdAlertProcessorDTO(adAlertProcessorDTO);
        this.adAlertProcessorDTOToEntity(adAlertProcessorDTO, entity, true);
        return entity;
    }
}